package org.changneng.framework.frameworkbusiness.service.impl;

import org.changneng.framework.frameworkbusiness.dao.PositionMapper;
import org.changneng.framework.frameworkbusiness.entity.Position;
import org.changneng.framework.frameworkbusiness.service.PositionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PositionServiceImpl implements PositionService {

    @Autowired
    private PositionMapper positionMapper;
    @Override
    public int insert(Position position) {
        return positionMapper.insert(position);
    }

    @Override
    public List<Position> selectAll() {
        return positionMapper.selectByExample(null);
    }

    @Override
    public int delete(int posid) {
        return positionMapper.deleteByPrimaryKey(posid);
    }

    @Override
    public int update(Position position) {
        return positionMapper.updateByPrimaryKey(position);
    }
}
